package com.huawei.zyb.taskManager.application.task.dto;

import com.huawei.zyb.taskManager.domain.task.valueobject.TaskPriority;
import com.huawei.zyb.taskManager.domain.task.valueobject.TaskStatus;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import jakarta.validation.constraints.Size;
import lombok.*;

/**
 * 更新任务命令
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UpdateTaskCommand {
    @NotNull(message = "任务ID不能为空")
    @Positive(message = "任务ID必须为正数")
    private Long taskId;
    
    @NotBlank(message = "任务标题不能为空")
    @Size(max = 200, message = "任务标题长度不能超过200个字符")
    private String title;
    
    @Size(max = 2000, message = "任务描述长度不能超过2000个字符")
    private String description;
    
    @NotNull(message = "任务优先级不能为空")
    private TaskPriority priority;
    
    @NotNull(message = "任务状态不能为空")
    private TaskStatus status;
    
    @Positive(message = "预估工时必须为正数")
    private Double estimatedHours;
    
    @Positive(message = "已投入工时必须为正数")
    private Double actualHours;
    
    @jakarta.validation.constraints.Min(value = 0, message = "任务进度不能小于0")
    @jakarta.validation.constraints.Max(value = 100, message = "任务进度不能大于100")
    private Integer progress;
}